﻿''' <summary>
''' メイン画面のフォームです。
''' </summary>
''' <remarks></remarks>
Public Class Main
  Inherits Page

#Region " イベントハンドラ "
  Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
    If Me.IsPostBack = False Then   '初期表示の時
      Me.LogonUserLabel.Text = Me.Request.LogonUserIdentity.Name
      Try
        Me.StatusLabel.Text = String.Format("ドメイン '{0}' に接続しています。", DirectoryAccess.DomainName)
        Me.Button2.Enabled = DirectoryAccess.CanConnectDomain
      Catch
        Me.Label1.Visible = True
        Me.Panel1.Enabled = False
      End Try
      Me.RadioButtonList1.SelectedIndex = Convert.ToInt32(Request.QueryString("idx"))
    End If
  End Sub

  Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Response.Redirect(String.Format("{0}List.aspx", Me.RadioButtonList1.SelectedValue))
  End Sub

  Protected Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
    Response.Redirect("DomainInfo.aspx")
  End Sub
#End Region
End Class